<template>
	<view class="container">
		<!-- 图片部分和二维码部分 -->
		<view>
			<image src="/static/images/top.jpg" class="bg"></image>
			<button size="mini" class="hym-btn" @click="MemberCenter">
				<image src="/static/images/mine/hym.png" @click="MagnifyingGlass"></image>
				<text style="margin-left: 8px; color: #a6b412;">会员码</text>
			</button>
		</view>
		<!-- 个人账户信息 -->
		<view style="padding: 0 30rpx;">
			<view class=" user-box Shadow">
				<view class="bigbox">
					<view class="avatar">
						<cover-image :src="userimg ? userimg : '/static/images/order/0edf1df4a0a61f3361.png'">
						</cover-image>
					</view>
					<view style="text-align: center;">
						<text @click='getUser'>{{username}}</text>
						<!-- <view> </view> -->
					</view>
					<view class="vips">会员权益</view>
				</view>
			</view>
		</view>
		<!-- 加入会员 -->
		<view class="vipbox Shadow">
			<view class="newsbox">
				<view>新用户加入会员，享会员权益</view>
				<view style="color: #b1bf25;" @tap='govip'>立即加入</view>
			</view>
			<view class="row">
				<view class="grid">
					<image src="/static/images/mine/rhyl.png"></image>
					<view>入会有礼</view>
				</view>
				<view class="grid">
					<image src="/static/images/mine/jfdh.png"></image>
					<view>积分兑换</view>
				</view>
				<view class="grid">
					<image src="/static/images/mine/sjtq.png"></image>
					<view>升级特权</view>
				</view>
				<view class="grid">
					<image src="/static/images/mine/srtq.png"></image>
					<view>生日特权</view>
				</view>
				<view class="grid">
					<image src="/static/images/mine/nxbz.png"></image>
					<view>奈雪宝藏</view>
				</view>
			</view>
		</view>
		<!-- 轮播图 -->
		<view class="swiper">
			<swiper @tap='gohome' indicator-dots="true" circular="true" indicator-color="white"
				indicator-active-color="orange" autoplay>
				<swiper-item>
					<image src="/static/images/mine/banner.png" class="banner" mode="widthFix"></image>
				</swiper-item>
				<swiper-item>
					<image src="/static/images/mine/banner1.png" class="banner" mode="widthFix"></image>
				</swiper-item>
				<swiper-item>
					<image src="/static/images/mine/banner2.png" class="banner" mode="widthFix"></image>
				</swiper-item>
				<swiper-item>
					<image src="/static/images/mine/banner3.png" class="banner" mode="widthFix"></image>
				</swiper-item>
			</swiper>
		</view>
		<!-- 我的服务 -->
		<view class="service-box">
			<view style="font-size: 18px; font-weight: 600; color: #5a5b5c;">我的服务</view>
			<view class="row">
				<view class="grid">
					<image src="/static/images/mine/jfqd.png"></image>
					<view>积分签到</view>
				</view>
				<view class="grid">
					<image src="/static/images/mine/stxy.png"></image>
					<view>送她心愿</view>
				</view>
				<view class="grid">
					<image src="/static/images/mine/nxsc.png"></image>
					<view>奈雪商城</view>
				</view>
				<view class="grid">
					<image src="/static/images/mine/lxkf.png"></image>
					<view>联系客服</view>
				</view>
				<view class="grid" @tap="orders">
					<image src="/static/images/mine/wddd.png"></image>
					<view>我的订单</view>
				</view>
				<view class="grid" @tap="userinfo">
					<image src="/static/images/mine/wdzl.png"></image>
					<view>我的资料</view>
				</view>
				<view class="grid" @tap="addresses">
					<image src="/static/images/mine/shdz.png"></image>
					<view>收货地址</view>
				</view>
				<view class="grid">
					<image src="/static/images/mine/gdfw.png"></image>
					<view>更多服务</view>
				</view>
			</view>
		</view>
		<!-- 底部 -->
		<view style="text-align: center; padding: 30rpx 0; font-size: 22rpx; color:#5a5b5c ;">
			会员卡适用于奈雪的茶和奈雪酒屋指定范围
		</view>


	</view>

</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {

		}
	}
</script>

<style scoped lang="scss">
	.Shadow {
		box-shadow: 0 6px 16px #e6edef;
	}

	.container {
		background: #f1f8fa;
		// height: 1000px;
	}

	.shows {
		display: none;
	}

	.Display {
		display: block;
	}

	.bg {
		width: 100%;
	}

	.hym-btn {
		position: absolute;
		top: 40rpx;
		right: 40rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50rem;
		box-shadow: 0 0 20rpx rgba(66, 66, 66, 0.1);

		&::after {
			border: 0;
		}

		image {
			width: 30rpx;
			height: 30rpx;
		}
	}

	.user-box {
		position: relative;
		border-radius: 8rpx;
		margin-bottom: 30rpx;
		margin-top: -115rpx;
		background-color: #fff;
		height: 5rem;
	}

	.bigbox {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0.3rem 1rem 0 0;

		.vips {
			position: relative;
			right: -16px;
			text-align: center;
			line-height: 2rem;
			width: 5rem;
			height: 2rem;
			background-color: #fab714;
			font-size: 12px;
			border-radius: 35px 0 0 35px;
			color: #fff;
		}
	}

	.avatar {
		position: relative;
		margin-top: -35rpx;
		margin-left: 35rpx;
		margin-right: 35rpx;
		width: 160rpx;
		height: 160rpx;
		border-radius: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: #FFFFFF;
		box-shadow: 0 0 20rpx rgba($color: #000000, $alpha: 0.2);
		overflow: hidden;

		image {
			width: 140rpx;
			height: 140rpx;
			border-radius: 100%;
		}

		.badge {
			position: absolute;
			right: -10rpx;
			bottom: -10rpx;
			background-color: #FFFFFF;
			border-radius: 50rem;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 24rpx;
			padding: 8rpx 16rpx;
			box-shadow: 0 0 20rpx rgba($color: #000000, $alpha: 0.2);

			image {
				width: 30rpx;
				height: 30rpx;
			}
		}
	}

	.vipbox {
		display: flex;
		flex-direction: column;
		justify-content: space-around;
		background-color: #fff;
		height: 8rem;
		width: 21.5rem;
		border-radius: 4px;
		margin: 30rpx auto;
		color: #646566;
		padding: 0 15px;
		box-sizing: border-box;

		.newsbox {
			display: flex;
			justify-content: space-between;

		}

		.row {
			display: flex;
			justify-content: space-between;

			.grid {
				font-size: 14px;

				image {
					width: 3rem;
					height: 3rem;

				}
			}
		}
	}

	.swiper {
		width: 21.5rem;
		margin: 0 auto;
		margin-bottom: 30rpx;
		text-align: center;

		.banner {
			width: 100%;
		}

		swiper {
			width: 21.5rem;
			height: 180rpx;
		}

		.red {
			background-color: red;
		}

		.green {
			background-color: PaleGreen;
		}

		.blue {
			background-color: SkyBlue;
		}
	}

	.service-box {
		display: flex;
		flex-direction: column;
		width: 21.5rem;
		margin: 0 auto;
		padding: 0 15px;
		box-sizing: border-box;
		background-color: #fff;
		border-radius: 4px;
		color: #5a5b5c;

		.row {
			display: flex;
			flex-wrap: wrap;
			justify-content: space-around;
			height: 140px;

			.grid {
				text-align: center;
				font-size: 16px;

				image {
					width: 40px;
					height: 40px;
				}
			}
		}
	}
</style>
